package com.njtoyo.taxi.admin.rest.controller.platform;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.aop.PermissionScope;
import com.njtoyo.taxi.admin.rest.presenter.platfrom.OperationRecordPresenter;
import com.njtoyo.taxi.admin.rest.wrapper.platform.OperationRecordLogWrapper;
import com.njtoyo.taxi.admin.service.platform.OperationRecordService;
import com.taxi.entity.common.RestResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/platform/operation-log")
@Api(tags = "操作日志")
public class OperationLogController {
    @Autowired
    private OperationRecordService operationRecordService;

    @GetMapping("")
    @ApiOperation(value = "操作日志列表", notes = "操作日志列表,权限：operation_log")
    @PermissionScope(names = {"operation_log"})
    public RestResult<Page<OperationRecordPresenter>> operationLogList(OperationRecordLogWrapper operationRecordLogWrapper) {
        return operationRecordService.operationLogList(operationRecordLogWrapper);
    }
}
